<template>
  <applyCommon :applyForm="form">
    <template #apply-1>
      <el-form-item label="交通申请人" prop="title">
        <el-input v-model="form.title" placeholder="交通申请人" class="w300"></el-input>
      </el-form-item>

      <el-row>
        <el-col :span="6">
          <el-form-item label="交通类型" prop="car_type">
            <el-select v-model="form.car_type" placeholder="交通类型" class="w300">
              <el-option :label="v.name" :key="v.id" :value="v.id" v-for="v in tracfficList"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="交通时段" prop="date_type">
            <el-select v-model="form.date_type" placeholder="交通时段" class="w300">
              <el-option :label="vv.name" :key="vv.id" :value="vv.id" v-for="vv in tracfficArea"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :span="7">
          <el-form-item label="交通始发站" prop="tracfficFrom">
            <el-input v-model="form.tracfficFrom" placeholder="交通始发站" class="w300"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="7">
          <el-form-item label="交通到达站" prop="tracfficTo">
            <el-input v-model="form.tracfficTo" placeholder="交通到达站" class="w300"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-form-item label="交通人数" prop="peopleNum">
        <el-input v-model="form.peopleNum" placeholder="交通人数" class="w300" type="number"></el-input>
      </el-form-item>

      <el-form-item label="交通日期" prop="date">
        <el-date-picker
          v-model="form.date"
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          value-format="yyyy-MM-dd"
        >
        </el-date-picker>
      </el-form-item>

    </template>
  </applyCommon>
</template>

<script>
    import applyCommon from "./applyCommon";
    export default {
        name: "applyTraffic",
        data(){
            return {
                form:{
                    xmid:'',
                    batch_id: '',
                    company: '',
                    dept: '',
                    ticketName: '',
                    desc: '',
                    created_at: '',
                    title:'',
                    car_type: 0,
                    date:'',
                    money: 0.00,
                    date_type:1,
                    peopleNum: 0,
                    tracfficFrom: '',
                    tracfficTo: '',
                    type: 9,
                },
                tracfficList: this.fun.tracfficList,
                tracfficArea:this.fun.tracfficArea,
            }
        },
        components: {applyCommon},
    }
</script>

<style scoped>

</style>
